import React, { PureComponent } from "react";
import { createContainer } from "../../src/index";
import Btn from "../components/Btn";
import Square from "../components/Square";

class App extends PureComponent {
  render() {
    const { count, actions, zoom } = this.props;
    const { add, minus, asyncAdd, asyncMinus } = actions;

    return (
      <div>
        <span>count: {count}</span>
        <Btn onClick={add}>add</Btn>
        <Btn onClick={minus}>minus</Btn>
        <Btn onClick={asyncAdd}>asyncAdd</Btn>
        <Btn onClick={asyncMinus}>asyncMinus</Btn>

        <Square zoom={zoom} />
      </div>
    );
  }
}

export default createContainer(App, {
  namespace: "compute1"
});
